package info.pixstone.foodhunter.domain.entity;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

import info.pixstone.foodhunter.acquaintance.IAAdWord;

@PersistenceCapable
public class EAdWord implements IAAdWord
{
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)	
	private Key key;
	
	 @Persistent
	private int AID;	
	 
	 @Persistent
	private int resID;
	 
	 @Persistent
	private String coutent;
	 
	 @Persistent
	private Date startTime;
	 
	 @Persistent
	private Date endTime;
	 
	 @Persistent
	private double adVersion;
	 //Constructor
	 public EAdWord()
	 {	 }
	public EAdWord(int adID, int resID, String coutent, Date startTime,
			Date endTime, double adVersion) {
		super();
		this.AID = adID;
		this.resID = resID;
		this.coutent = coutent;
		this.startTime = startTime;
		this.endTime = endTime;
		this.adVersion = adVersion;
	}

	@Override
	public void setAID(int adID) {
		// TODO Auto-generated method stub
		this.AID=adID;
	}

	@Override
	public void setResID(int resID) {
		// TODO Auto-generated method stub
		this.resID=resID;
	}

	@Override
	public void setCoutent(String content) {
		// TODO Auto-generated method stub
		this.coutent=content;
	}

	@Override
	public void setStartTime(Date startTime) {
		// TODO Auto-generated method stub
		this.startTime=startTime;
	}

	@Override
	public void setEndTime(Date endTime) {
		// TODO Auto-generated method stub
		this.endTime=endTime;
	}

	@Override
	public void setAdVersion(double version) {
		// TODO Auto-generated method stub
		this.adVersion=version;
	}

	@Override
	public int getAID() {
		// TODO Auto-generated method stub
		return this.AID;
	}

	@Override
	public int getResID() {
		// TODO Auto-generated method stub
		return this.resID;
	}

	@Override
	public String getCoutent() {
		// TODO Auto-generated method stub
		return this.coutent;
	}

	@Override
	public Date getStartTime() {
		// TODO Auto-generated method stub
		return this.startTime;
	}

	@Override
	public Date getEndTime() {
		// TODO Auto-generated method stub
		return this.endTime;
	}

	@Override
	public double getAdVersion() {
		// TODO Auto-generated method stub
		return this.adVersion;
	}

	@Override
	public Key getKey() {
		// TODO Auto-generated method stub
		return key;
	}
	

}
